package com.xian.ucenter.controller.front;

import com.xian.ucenter.annotation.WebView;
import com.xian.ucenter.commons.Result;
import com.xian.ucenter.entities.vo.PostQuery;
import com.xian.ucenter.service.IndexService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/ucenter/front")
public class IndexController {
    @Autowired
    private IndexService indexService;
    @WebView
    @GetMapping("/index")
    public Result getIndexInfo() {
        return indexService.getIndexInfo();
    }
    @GetMapping("/lastPosts")
    public Result getLastPosts() {
        return indexService.getLastPosts();
    }
}
